package org.ceteca.explica.client;

import org.ceteca.javaglade.toolkit.swt.StatusBar;
import org.eclipse.swt.widgets.ProgressBar;

public class GetInitProgressBarOperation implements Runnable {
	private ProgressBar progressBar;
	private int currentProgress;
	
	public GetInitProgressBarOperation(ProgressBar progressBar) {
		this.progressBar = progressBar;
		this.currentProgress = -1;
	}
	
	public void run() {
		if (progressBar.isDisposed()) return;
		
		this.currentProgress = progressBar.getSelection();
		
		System.out.println("------------------- CURRENT PROGRESS:" + this.currentProgress);
	}
	
	public int getCurrentProgress() {
		return this.currentProgress;
	}
}